package biz.ezcom.spring.ioc.test;

import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import biz.ezcom.spring.ioc.service.UserService;


public class Client {
	public static ApplicationContext context = null;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		context = new ClassPathXmlApplicationContext("applicationContext-bean.xml");
	}
	
	@Test
	public void test(){
		UserService userService = (UserService) context.getBean("userService");
		userService.saveUser();
	}
	
}
